home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
cprog.EXE
/
CC_1.ZIP
/
PERROR.C
< prev
next >
Wrap
Text File
|
1988-02-01
|
640b
|
15 lines
/*
** print string s, followed by a colon and the message corresponding to
** the current value of _errno
*/
extern int *stderr, fputs(), fputc(), errno, sys_nerr, sys_errlist[];
perror(s) char *s; {
fputs(s, stderr);
fputs(": ", stderr);
if(errno < sys_nerr)
fputs(sys_errlist[errno], stderr);
else
fputs("Undefined error", stderr);
fputc('\n', stderr);
}